package org.zp.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.zp.mapper.ExpressInfoMapper;
import org.zp.pojo.ExpressInfo;
import org.zp.vo.ExperssVo;

import com.github.pagehelper.PageHelper;

@Service
@Transactional(rollbackFor = Exception.class)//出现异常就回滚事务
public class ExpressInfoServiceimpl implements ExpressInfoService{
	@Resource
	private ExpressInfoMapper e;

	

	@Override
	public ExpressInfo getExpressInfo(Integer Fid) {
		// TODO Auto-generated method stub
		return e.getExpressInfo(Fid);
	}



	@Override
	public Integer insertExpress(ExpressInfo einfo) {
		// TODO Auto-generated method stub
		return e.insertExpress(einfo);
	}



	



	@Override
	public List<ExpressInfo> getLogistics(Long typeid,Long check, String start, String end, Integer startpage, Integer limitpage) {
		// TODO Auto-generated method stub

		PageHelper.startPage(startpage, limitpage);

		List<ExpressInfo> css=e.getLogistics(typeid,check, start, end);
		System.out.println("返回list"+css);
		return css;
	}






	@Override
	public List<ExpressInfo> selectlog() {
		// TODO Auto-generated method stub
		return e.selectlog();
	}



	@Override
	public List<ExperssVo> getCheckFile(String title, String username, String start, String end, Integer startpage,
			Integer limitpage) {
		PageHelper.startPage(startpage, limitpage);
		return e.selectLogistics(title,username,start,end,startpage,limitpage);
	}



	@Override
	public Integer checkExpress(Integer fid, Integer iStatus) {
		// TODO Auto-generated method stub
		return e.checkExpress(fid,iStatus);
	}



	@Override
	public List<ExperssVo> selectSendFile(Long sendState,String title, String username, String start, String end, Integer startpage,
			Integer limitpage) {
		PageHelper.startPage(startpage, limitpage);
		return e.selectSendFile(sendState,title,username,start,end,startpage,limitpage);
	}



	@Override
	public Integer updateSendState(Integer eid, Integer sendState) {
		// TODO Auto-generated method stub
		return e.updateSendState(eid,sendState);
	}



	@Override
	public Integer countEX(Integer naidd, Integer state) {
		System.out.println("XXXOOOOXXXXOOOOXXXXXOOOO网点"+naidd);
		System.out.println("XXXOOOOXXXXOOOOXXXXXOOOO状态"+state);
		return e.countEX(naidd,state);
	}



	@Override
	public Integer countEX2(Integer areaid, int iStatus) {
		// TODO Auto-generated method stub
		return e.countEX2(areaid,iStatus);
	}
}
